#include<errno.h>
#include<string.h>
#include<unistd.h>
#include<stdio.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#define LOG "logNormal.txt"
#define LOG_ERROR "logerror.txt"

int main()
{
//c接口
  fprintf(stdout,"hello fprintf\n");
//系统调用
const char* msg="hello msg\n";
write(1,msg,strlen(msg));//
fork();






//  int fd=open(LOG,O_RDONLY | O_WRONLY | O_CREAT,06666 );
//  if(fd<0)
//  {
//    perror("open");return 1;
//  }
//  dup2(fd,1);
//  printf("hello world,hellobit\n");
//  close(fd);
  //close(0);
  //close(1);
  //close(2);
  //open(LOG,O_WRONLY | O_CREAT | O_APPEND,0666);
  //open(LOG_ERROR,O_WRONLY | O_CREAT | O_APPEND,0666);
  //printf("hello printf->stdout\n");
  //printf("hello printf->stdout\n");
  //printf("hello printf->stdout\n");
  //printf("hello printf->stdout\n");
  //printf("hello printf->stdout\n");
  //printf("hello printf->stdout\n");
  //fprintf(stdout,"hello fprintf->stdout\n");
  //fprintf(stdout,"hello fprintf->stdout\n");
  //fprintf(stdout,"hello fprintf->stdout\n");
  //fprintf(stdout,"hello fprintf->stdout\n");
  //fprintf(stdout,"hello fprintf->stdout\n");
  //fprintf(stdout,"hello fprintf->stdout\n");
  //fprintf(stderr,"hello fprintf->stderr\n");
  //fprintf(stderr,"hello fprintf->stderr\n");
  //fprintf(stderr,"hello fprintf->stderr\n");
  //fprintf(stderr,"hello fprintf->stderr\n");
  //fprintf(stderr,"hello fprintf->stderr\n");
  //fprintf(stderr,"hello fprintf->stderr\n");
  ////int fd=open(LOG,O_WRONLY | O_CREAT | O_APPEND,0666);
  ////int fd=open(LOG,O_RDONLY);
  ////int a,b;
  ////scanf("%d %d",&a,&b);
  ////printf("a=%d,b=%d\n",a,b);
////  printf("youcanseme!");
////  printf("youcanseme!");
////  printf("youcanseme!");
//  printf("youcanseme!");
//  printf("youcanseme!");
//

  return 0;
}
